package world.controllers

import org.apache.shiro.authz.annotation.Logical
import org.apache.shiro.authz.annotation.RequiresRoles
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.ResponseBody

@Controller
class ShiroController {

    /**
     * 首页
     */
    @RequiresRoles(value = ["管理员", "付费用户", "普通用户"], logical = Logical.OR)
    @RequestMapping(value="/")
    def index() {
        return "shiro/index"
    }

    /**
     * 登录页
     */
    @RequestMapping(value="/login")
    def login() {
        return "shiro/login"
    }

}
